﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EntityModels
{
    partial class Event
    {

        public Event() { }

        public Event(User admin, String name, DateTime endvoting, bool visibility)
        {
            this.eidmember = admin.idmember;
            this.name = name;
            this.voteenddate = endvoting;
            this.visibility = visibility;
        }

    }

    partial class User
    {

        public User() { }

        //Constructor for a initial user
        public User(String username, String password, String firstname, String lastname, String email)
        {
            this.username = username;
            this.password = password;
            this.firstname = firstname;
            this.lastname = lastname;
            this.email = email;
            this.rating = 0;
            this.about = "";
            this.privateprofile = false;
            this.showattevents = true;
            this.showemail = true;
            this.showmyevents = true;
            this.showname = true;
        }

        //Constructor for user who was created and wants to update his info by edit profile
        public User(String username, String password, String firstname, String lastname, String email, Int32 rating, string about, bool privateprofile, bool showfullname, bool showemail, bool showmyevents, bool showattevents)
        {
            this.username = username;
            this.password = password;
            this.firstname = firstname;
            this.lastname = lastname;
            this.email = email;
            this.rating = rating;
            this.about = about;
            this.privateprofile = privateprofile;
            this.showattevents = showattevents;
            this.showemail = showemail;
            this.showmyevents = showmyevents;
            this.showname = showfullname;
        }

        public override String ToString()
        {
            return base.ToString();
        }

    }

    public partial class LocationOptions
    {
        public LocationOptions() { }

        public LocationOptions(Event ev, Location lo)
        {
            this.eidevent = ev.idevent;
            this.eidlocation = lo.idlocation;
            this.votes = 0;
        }


    }

    public partial class Location
    {

        public Location() { }

        public Location(String locationPlace, String country, String city, String address)
        {
            this.locationplace = locationPlace;
            this.country = country;
            this.city = city;
            this.address = address;
        }

        public override String ToString()
        {
            return base.ToString();
        }



    }

    public partial class DateOptions
    {
        public DateOptions() { }
        public DateOptions(Event ev, DateTime date)
        {
            this.eidevent = ev.idevent;
            this.DATE = date;
            this.votes = 0;
        }
    }

    public partial class TimeOptions
    {
        public TimeOptions() { }
        public TimeOptions(Event ev, TimeSpan time)
        {
            this.eidevent = ev.idevent;
            this.TIME = time;
            this.votes = 0;
        }


    }

    public partial class Votes
    {
        public Votes() { }
        public Votes(User us, Event ev, int type)
        {
            this.eidmember = us.idmember;
            this.eidevent = ev.idevent;
            this.TYPE = type;
        }

    }

    public partial class Invites
    {
        public Invites() { }
        public Invites(User us, Event ev)
        {
            this.eidevent = ev.idevent;
            this.eidmember = us.idmember;
            this.answer = false;
        }

    }
}
